let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n159,
                    i =
                    (this && this.__extends) ||
                    ((_n159 = function n(t, e) {
                            return (_n159 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n159(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.StageCom = void 0);
                var r = t('UIComponent'),
                    a = t('MonsterActor'),
                    s = t('ChapterRoundCfg'),
                    c = t('MonsterInfo'),
                    l = t('StageIdleAct'),
                    u = t('ResMrg'),
                    h = t('ComUtils'),
                    p = (function(t) {
                        function e() {
                            return (null !== t && t.apply(this, arguments)) || this;
                        }
                        return (
                            i(e, t),
                            (e.prototype.onInit = function() {
                                t.prototype.onInit.call(this),
                                    (this._ndRoot = this.view.getChildByName('root')),
                                    (this._ndLock = this.view.getChildByName('lock')),
                                    (this._imgBg = this._ndRoot.getComponent(cc.Sprite)),
                                    (this._actors = []);
                            }),
                            (e.prototype.onActive = function(t) {
                                for (var e = 0; e < this._actors.length; e++) {
                                    t ? this._actors[e].resume() : this._actors[e].pause();
                                }
                            }),
                            (e.prototype.setLock = function(t) {
                                (this._ndLock.active = t),
                                h.default.setColor(
                                    this._ndRoot,
                                    t ? e.LockColor : e.UnLockColor
                                );
                            }),
                            (e.prototype.onUpdate = function(e) {
                                t.prototype.onUpdate.call(this, e);
                                for (var o = 0; o < this._actors.length; o++) {
                                    this._actors[o].update(e);
                                }
                            }),
                            (e.prototype.setChapter = function(t) {
                                for (var e = 0; e < this._actors.length; e++) {
                                    this._actors[e].entity.setParent(null),
                                        this._actors[e].destroy();
                                }
                                this._actors = [];
                                var o = s.ChapterRoundCfg.ins.getDataByChapter(t.id);
                                for (
                                    u.ResMrg.loadSprite(this._imgBg, 'Texture/Stage/' + t.stage),
                                    e = 0; e < o.length; e++
                                ) {
                                    if (o[e].bossId > 0) {
                                        for (var n = 0; n < 3; n++) {
                                            var i = this._ndRoot.getChildByName('actor' + n),
                                                r = new c.default(o[e].bossId),
                                                h = new a.MonsterActor(r, t.monsterModel, 1);
                                            (h.entity.parent = i),
                                            (h.entity.scale = 1),
                                            this._actors.push(h),
                                                h.act(l.StageIdleAct);
                                        }
                                        return;
                                    }
                                }
                            }),
                            (e.LockColor = cc.color(128, 128, 128)),
                            (e.UnLockColor = cc.color(255, 255, 255)),
                            e
                        );
                    })(r.UIComponent);
                (o.StageCom = p), console.log("end");
            module.exports =  e.exports;